<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>标准件数据提交系统</title>
    <link rel="icon" type="image/x-icon" href="/static/favicon.ico">
    {% block styles %}
    <link rel="stylesheet" href="{{ url_for('static', filename='css/bootstrap.min.css') }}">
    {% endblock %}
    <script src="/static/js/jquery-1.12.4.js"></script>
    <script>
        $(function(){
            // 点击事件change
            var item = document.getElementById('mo_item');
            $('input[type=radio][name=notes]').change(function () {
                // 获取input radio选中值，方法一
                // var myvalue = $('input:radio[name="notes"]:checked').val();
                // 获取input radio选中值，方法二
                var myvalue = $(this).val();
                // console.log(myvalue);
                if(myvalue == '一次性'){
                    item.style.display = "block"
                }else{
                    item.style.display = "none";
                }
            });
        })
    </script>
</head>

<body>

<div class="container">
        <br>
        <br>
        <h5 class="col-md-6 offset-md-3">标准件数据提交系统</h5>
<br>
        <form method="post" enctype="multipart/form-data">
        {{ form2.csrf_token }}
        <div class="col-md-4 offset-md-3 ">

            {{ form2.item_code.label }}<br>
            {{ form2.item_code }}<br>
            {% if form2.item_code.errors %}
            {% for message in form2.item_code.errors %}
            <small class="error" style="color: red">{{ message }}</small><br>
            {% endfor %}
            {% endif %}
        <br>

            {{ form2.moid.label }}<br>
            {{ form2.moid }}<br>
            {% if form2.moid.errors %}
            {% for message in form2.moid.errors %}
            <small class="error" style="color: red">{{ message }}</small><br>
            {% endfor %}
            {% endif %}
        <br>
        </div>
        <div class="col-md-2 offset-md-3 ">
        {{ form2.submit(class='btn btn-success btn-lg btn-block')}}
        </div>
        <br>

    </form>
</div>
{#<a href="{{ url_for('coef') }}" class="col-md-6 offset-md-3">获取校准系数</a>#}
</body>
</html>


